package com.zhl.test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.zhl.model.User;
import com.zhl.service.OldUserService;
import com.zhl.service.UserService;

public class test {
	
	public static void main(String[] args){
		@SuppressWarnings("resource")
		ApplicationContext context = new ClassPathXmlApplicationContext( "config/spring-common.xml");// 加载 spring 配置文件
		    
		//OldUserService s = (OldUserService) context.getBean("oldUserService"); 
		UserService s = (UserService) context.getBean("userService"); 
		//User a = s.getUserByName2("托尼斯塔克");
		//User b = s.getUserByName2("天王盖地虎");
		//s.getUserByName2("托尼斯塔克");
		//s.getUserByName2("天王盖地虎");
		s.getAll();
		s.getAll();s.getAll();s.getAll();s.getAll();

		UserService ss = (UserService) context.getBean("userService"); 
		ss.getAll();ss.getAll();ss.getAll();ss.getAll();
	}

}
